<template>
	<view>
		<!-- 视频贴 -->
		<view type="8">
		<!-- 	<h-com-head :userVo="userVo" :msgVo="msgVo"></h-com-head> -->
			<h-com-cigar :cardVo="cardVo" :gameVo="gameVo"></h-com-cigar>
		<!-- 	<h-com-conent :userVo="userVo" :msgVo="msgVo"></h-com-conent>
			<h-com-video :videoVo="videoVo"></h-com-video> -->
		</view>
	</view>
	<!-- 投票 -->
	<!-- <view type="6"> -->
	<!-- 	<h-com-head :userVo="userVo"></h-com-head>
	<h-com-conent :userVo="userVo" :msgVo="msgVo"></h-com-conent> -->
<!-- 	<h-com-card :cardVo="cardVo" :gameVo="gameVo"></h-com-card> -->
 <!-- <h-com-location :postionVo="postionVo"></h-com-location> -->
 <!-- <h-com-picture :pictureVo="pictureVo"></h-com-picture> -->
<!-- <h-com-post></h-com-post> -->
<!-- <h-com-title :pictureVo="pictureVo"></h-com-title> -->
<!-- <h-com-video :videoVo="videoVo"></h-com-video> -->
<!-- <h-com-head :userVo="userVo"></h-com-head>
<h-com-conent :userVo="userVo" :msgVo="msgVo"></h-com-conent> 
<h-com-vote :voteVo="voteVo" :userVo="userVo"></h-com-vote> -->
<!-- </view> -->
<!-- 文章（长图的）-->
	<!-- <view type="1">
		<h-com-head :userVo="userVo"></h-com-head>
		<h-com-conent :userVo="userVo" :msgVo="msgVo"></h-com-conent>
		<h-com-title :pictureVo="pictureVo"></h-com-title> 
	</view> -->
	<!-- 活动的 -->
	<!-- <view type="4">
		<h-com-head :userVo="userVo"></h-com-head>
		<h-com-conent :userVo="userVo" :msgVo="msgVo"></h-com-conent>
		<h-com-card :cardVo="cardVo" :gameVo="gameVo"></h-com-card>
	</view> -->
	
</template>
<script setup lang="ts">
import { HTTP_API_URL } from '@/common/consts/Consts';
import { HttpMethod, httpUtil } from '@/common/netWork/httpUtil';
import Tool from '@/common/utils/Tool';
import type { IUserVo,IMsg} from '@/logic/globInterface/dataInterface';
import { onBeforeMount, reactive, ref, watch } from 'vue';
	// const userVo:IUserVo = {
	// 	nickName:"sfasf",
	// 	picUrl:"https://img-blog.csdnimg.cn/c62a2cc04dd3416c9077617b2c48e66b.png"
	// }
	const userVo:IUserVo = reactive({} as IUserVo);
	const msgVo:IMsg=reactive({} as IMsg)
	const cardVo=reactive({});
	const gameVo=reactive({});
	const postionVo=reactive({})
	const pictureVo=reactive({})
	const videoVo=reactive({})
	const voteVo=reactive({})
	let type=ref('')
	const getType = (item:any)=>{
		return item || {}
	}
	onBeforeMount(async ()=>{
		const nowDate = new Date().getTime();
		const msg = await httpUtil.request(HTTP_API_URL.MSG_QUERYAllMSG,HttpMethod.POST,{"size":"10","page":"0","createDate":nowDate})
		const data=JSON.parse(msg.data)
		console.log(data,'66666')
		let cigarUser = data[0].cigarUser;
		Tool.buildInitProp(cigarUser,userVo);
		console.log(userVo,'445555')
		//测试帖子
		// let comment=data[0]
		// Tool.buildInitProp(comment,msgVo);
		// console.log('www',comment)
    //card测试
		let card=data[0].cigar
		 Tool.buildInitProp(getType(card),cardVo)
		//活动测试
		// let game=data[0].cigarGame
		// console.log('hhh',game)
		// Tool.buildInitProp(game,gameVo)
		//定位测试
		// let postion=data[0]
		// console.log('postion',postion)
		// Tool.buildInitProp(postion,postionVo)
		//、图片测试
		// let picture=data[0]
		// console.log('uuu',picture)
		// Tool.buildInitProp(picture,pictureVo)
		// let post=data[0]
		// console.log(post,'555')
		//视频测试
		// let videoMsg=data[0].videoMsg
  //   console.log('rrr', videoMsg)
  //    Tool.buildInitProp(videoMsg,videoVo)
	//投票
	// let post=data[0].voteQuestion
	// console.log('post',post)
	// Tool.buildInitProp(post,voteVo)
	})
	watch(userVo,(oldValue,changeValue)=>{
			console.log("oldValue:" + oldValue.vColor);
			console.log("changeValue:" + changeValue.vColor);
	})
</script>

<style>

</style>
